package org.example.DesignPatterns.Composite;

/**
 * @description:
 * @author: farprt
 * @create: 2022-09-18 13:12
 **/
public class File extends Node{
    public File(String name) {
        super(name);
    }

    @Override
    protected void add(Node child) throws Exception {
        throw new Exception("文件不能添加子节点");
    }

    @Override
    protected void tree(int space) {
        super.tree(space);
    }
}